home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / DShowIDL / qedit.idl < prev    next >
Encoding:
Text File  |  2002-11-12  |  68.8 KB  |  1,735 lines

  1. //------------------------------------------------------------------------------
  2. // File: QEdit.idl
  3. //
  4. // Copyright (c) 1992 - 2002, Microsoft Corporation.  All rights reserved.
  5. //------------------------------------------------------------------------------
  6.  
  7.  
  8. import "oaidl.idl";
  9. import "ocidl.idl";
  10. import "dxtrans.idl";
  11. import "amstream.idl";
  12. import "msxml.idl";
  13.  
  14. //
  15. // forward declare
  16. //
  17. interface IAMTimelineGroup;
  18. interface IAMTimelineObj;
  19. interface IAMTimelineEffect;
  20. interface IAMTimelineTrans;
  21. interface IAMTimelineSrc;
  22. interface IAMTimeline;
  23. interface IAMErrorLog;
  24. interface ISampleGrabber;
  25. interface IPropertySetter;
  26.  
  27. // used by DEXTER_VALUE's dwInterp var
  28. typedef enum
  29. {
  30.     DEXTERF_JUMP,
  31.     DEXTERF_INTERPOLATE
  32. } DEXTERF;
  33.  
  34. // used to set values on the property setter
  35. typedef struct
  36. {
  37.     BSTR Name;
  38.     DISPID dispID;
  39.     LONG nValues;
  40. } DEXTER_PARAM;
  41.  
  42. // used to set values on the property setter
  43. typedef struct
  44. {
  45.     VARIANT v;
  46.     REFERENCE_TIME rt;
  47.     DWORD dwInterp;    // one of the DEXTERF_ flags
  48. } DEXTER_VALUE;
  49.  
  50. // used by bMethod directly below
  51. enum
  52. {
  53.     DEXTER_AUDIO_JUMP,
  54.     DEXTER_AUDIO_INTERPOLATE
  55. };
  56.  
  57. // used to set volumes on the mixer and mixer pins
  58. typedef struct
  59. {
  60.     REFERENCE_TIME        rtEnd;        //end Time
  61.     double                dLevel;    //end Volume Level
  62.     BOOL                bMethod;    //jump or interpolate
  63. } DEXTER_AUDIO_VOLUMEENVELOPE ;
  64.  
  65. // used in IAMTimeline::Get(Set)InsertMode
  66. enum
  67. {
  68.     TIMELINE_INSERT_MODE_INSERT = 1,
  69.     TIMELINE_INSERT_MODE_OVERLAY = 2
  70. };
  71.  
  72. //
  73. // define what main 'things' can be put into the timeline tree.
  74. // these values are used quite a bit with timeline access
  75. // (bitmap mask flags)
  76. typedef enum
  77. {
  78.     TIMELINE_MAJOR_TYPE_COMPOSITE = 1,
  79.     TIMELINE_MAJOR_TYPE_TRACK = 2,
  80.     TIMELINE_MAJOR_TYPE_SOURCE = 4,
  81.     TIMELINE_MAJOR_TYPE_TRANSITION = 8,
  82.     TIMELINE_MAJOR_TYPE_EFFECT = 16,
  83.     TIMELINE_MAJOR_TYPE_GROUP = 128
  84. } TIMELINE_MAJOR_TYPE;
  85.  
  86. // used in various IAMTimelineXXX "search" functions. Look in this
  87. // file for "SearchDirection" to see where it's used. I didn't want
  88. // to use an enum as an interface param type, so I used a long. 
  89. typedef enum
  90. {
  91.     DEXTERF_BOUNDING = -1,        // finds any source whose start <= Time and stop > Time
  92.     DEXTERF_EXACTLY_AT = 0,        // finds any source that starts exactly at Time
  93.     DEXTERF_FORWARDS = 1        // finds any source that starts at or after Time
  94. } DEXTERF_TRACK_SEARCH_FLAGS;
  95.  
  96. // right now, the media type in the group contains enough information about
  97. // how we want to recompress. This might not be enough information in the 
  98. // future, so we define a structure we can get and set to the group. 
  99. //
  100. typedef struct _SCompFmt0
  101. {
  102.     long nFormatId;
  103.     AM_MEDIA_TYPE MediaType;
  104. } SCompFmt0;
  105.  
  106. // used in IAMTimelineSrc::Get(Set)StretchMode
  107. // 
  108. enum
  109. {
  110.     RESIZEF_STRETCH,
  111.     RESIZEF_CROP,
  112.     RESIZEF_PRESERVEASPECTRATIO,
  113.     RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX
  114. };
  115.  
  116. // used in IRenderEngine::SetDynamicReconnectLevel
  117. // (bitmap mask flags)
  118. enum
  119. {
  120.     CONNECTF_DYNAMIC_NONE = 0x00000000,
  121.     CONNECTF_DYNAMIC_SOURCES = 0x00000001,
  122.     CONNECTF_DYNAMIC_EFFECTS = 0x00000002
  123. };
  124.  
  125. // used in
  126. // IMediaLocator::FindMediaFile
  127. // IRenderEngine::SetSourceNameValidation
  128. // IAMTimeline::ValidateSourceNames
  129. // (bitmap mask flags)
  130. enum
  131. {
  132.     SFN_VALIDATEF_CHECK        = 0x00000001,   // do a check. Without this set, no check will be done.
  133.     SFN_VALIDATEF_POPUP        = 0x00000002,   // should UI popup show if not found
  134.     SFN_VALIDATEF_TELLME       = 0x00000004,   // warn user about replaced files
  135.     SFN_VALIDATEF_REPLACE      = 0x00000008,   // should it replace names in the tldb if found
  136.     SFN_VALIDATEF_USELOCAL     = 0x000000010,  // use local media preferrably over networked media
  137.     SFN_VALIDATEF_NOFIND       = 0x000000020,  // never find filenames, always use UI popup to find.,
  138.                                                // when used, _POPUP must be used as well
  139.     SFN_VALIDATEF_IGNOREMUTED  = 0x000000040,  // ignore muted files in the tldb
  140.     SFN_VALIDATEF_END
  141. };
  142.  
  143. // key transitions types
  144. enum
  145. {
  146.     DXTKEY_RGB,        
  147.     DXTKEY_NONRED,         
  148.     DXTKEY_LUMINANCE,      
  149.     DXTKEY_ALPHA,          
  150.     DXTKEY_HUE
  151. };
  152.  
  153.  
  154. ////////////////////////////////////////////////////////////////
  155. ////////////////////////////////////////////////////////////////
  156. // New Property setting Interfaces
  157. ////////////////////////////////////////////////////////////////
  158. ////////////////////////////////////////////////////////////////
  159.  
  160. // interface for objects which can save/load IDispatch-able properties
  161. [
  162.     object,
  163.     uuid(AE9472BD-B0C3-11D2-8D24-00A0C9441E20),
  164.     helpstring("IPropertySetter Interface"),
  165.     pointer_default(unique)
  166. ]
  167. interface IPropertySetter : IUnknown // IPersist?
  168. {
  169.     // for loading and saving through XML
  170.     HRESULT LoadXML([in] IUnknown * pxml);
  171.     // !!! doesn't work HRESULT LoadXML([in] IXMLElement * pxml);
  172.     HRESULT PrintXML([out] char *pszXML, [in] int cbXML, [out] int *pcbPrinted,[in] int indent);
  173.          
  174.     // for cloning a portion of the props when splitting the object
  175.     //AUTOMATE
  176.     HRESULT CloneProps([out] IPropertySetter **ppSetter,
  177.             [in] REFERENCE_TIME rtStart,
  178.             [in] REFERENCE_TIME rtStop);
  179.  
  180.     // for loading and saving programmatically
  181.     // caller must call this in pre-sorted order, this time must be > all
  182.     // previous times
  183.     //AUTOMATE
  184.     HRESULT AddProp([in] DEXTER_PARAM Param,
  185.             [in] DEXTER_VALUE *paValue);
  186.     //AUTOMATE
  187.     HRESULT GetProps([out] LONG *pcParams,
  188.              [out] DEXTER_PARAM **paParam,
  189.             [out] DEXTER_VALUE **paValue);
  190.     // after calling GetProps, you must call FreeProps to free resources
  191.     //AUTOMATE
  192.     HRESULT FreeProps([in] LONG cParams,
  193.             [in] DEXTER_PARAM *paParam,
  194.             [in] DEXTER_VALUE *paValue);
  195.     // to empty to property setter, so you can start over again
  196.     HRESULT ClearProps();
  197.  
  198.     // for persisting
  199.     HRESULT SaveToBlob([out] LONG *pcSize, [out] BYTE **ppb);
  200.     HRESULT LoadFromBlob([in] LONG cSize, [in] BYTE *pb);
  201.  
  202.     // to program the object that supports IDispatch with the props
  203.     // call with rtNow == -1 to set Static Props when your object instantiates
  204.     // errors will be logged, if a log is provided
  205.     //AUTOMATE
  206.     HRESULT SetProps([in] IUnknown *pTarget,
  207.             [in] REFERENCE_TIME rtNow);
  208.  
  209.     // unicode version
  210.     HRESULT PrintXMLW([out] WCHAR *pszXML, [in] int cchXML, [out] int *pcchPrinted,[in] int indent);
  211. };
  212.  
  213. // supported by our DxtCompositor class, this allows us to draw whatever comes in
  214. // upon only a portion of the output bitmap
  215.  
  216. [
  217.     object,
  218.     uuid(BB44391E-6ABD-422f-9E2E-385C9DFF51FC),
  219.     dual,
  220.     helpstring("IDxtCompositor Interface"),
  221.     pointer_default(unique)
  222. ]
  223. interface IDxtCompositor : IDXEffect
  224. {
  225.     [propget, id(1), helpstring("property OffsetX")] HRESULT OffsetX([out, retval] long *pVal);
  226.     [propput, id(1), helpstring("property OffsetX")] HRESULT OffsetX([in] long newVal);
  227.     [propget, id(2), helpstring("property OffsetY")] HRESULT OffsetY([out, retval] long *pVal);
  228.     [propput, id(2), helpstring("property OffsetY")] HRESULT OffsetY([in] long newVal);
  229.     [propget, id(3), helpstring("property Width")] HRESULT Width([out, retval] long *pVal);
  230.     [propput, id(3), helpstring("property Width")] HRESULT Width([in] long newVal);
  231.     [propget, id(4), helpstring("property Height")] HRESULT Height([out, retval] long *pVal);
  232.     [propput, id(4), helpstring("property Height")] HRESULT Height([in] long newVal);
  233.  
  234.     [propget, id(5), helpstring("property SrcOffsetX")] HRESULT SrcOffsetX([out, retval] long *pVal);
  235.     [propput, id(5), helpstring("property SrcOffsetX")] HRESULT SrcOffsetX([in] long newVal);
  236.     [propget, id(6), helpstring("property SrcOffsetY")] HRESULT SrcOffsetY([out, retval] long *pVal);
  237.     [propput, id(6), helpstring("property SrcOffsetY")] HRESULT SrcOffsetY([in] long newVal);
  238.     [propget, id(7), helpstring("property SrcWidth")] HRESULT SrcWidth([out, retval] long *pVal);
  239.     [propput, id(7), helpstring("property SrcWidth")] HRESULT SrcWidth([in] long newVal);
  240.     [propget, id(8), helpstring("property SrcHeight")] HRESULT SrcHeight([out, retval] long *pVal);
  241.     [propput, id(8), helpstring("property SrcHeight")] HRESULT SrcHeight([in] long newVal);
  242. };
  243.  
  244. [
  245.     object,
  246.     uuid(4EE9EAD9-DA4D-43d0-9383-06B90C08B12B),
  247.     dual,
  248.     helpstring("IDxtAlphaSetter Interface"),
  249.     pointer_default(unique)
  250. ]
  251. interface IDxtAlphaSetter : IDXEffect
  252. {
  253.     // set the alpha to a particular number
  254.     [propget, id(1), helpstring("property Alpha")] HRESULT Alpha([out, retval] long *pVal);
  255.     [propput, id(1), helpstring("property Alpha")] HRESULT Alpha([in] long newVal);
  256.  
  257.     // set the alpha to a percentage of it's full value
  258.     [propget, id(2), helpstring("property AlphaRamp")] HRESULT AlphaRamp([out, retval] double *pVal);
  259.     [propput, id(2), helpstring("property AlphaRamp")] HRESULT AlphaRamp([in] double newVal);
  260. };
  261.  
  262. // Supported by our JPEG DXT, that can do any wipe based on a bitmap
  263. //
  264.  
  265. [
  266.     object,
  267.     uuid(DE75D011-7A65-11D2-8CEA-00A0C9441E20),
  268.     dual,
  269.     helpstring("IDxtJpeg Interface"),
  270.     pointer_default(unique)
  271. ]
  272. interface IDxtJpeg : IDXEffect
  273. {
  274.     [propget, id(1), helpstring("property MaskNum")] HRESULT MaskNum([out, retval] long *);
  275.     [propput, id(1), helpstring("property MaskNum")] HRESULT MaskNum([in] long);
  276.     [propget, id(2), helpstring("property MaskName")] HRESULT MaskName([out, retval] BSTR *pVal);
  277.     [propput, id(2), helpstring("property MaskName")] HRESULT MaskName([in] BSTR newVal);
  278.     [propget, id(3), helpstring("property ScaleX")] HRESULT ScaleX([out, retval] double *);
  279.     [propput, id(3), helpstring("property ScaleX")] HRESULT ScaleX([in] double);
  280.     [propget, id(4), helpstring("property ScaleY")] HRESULT ScaleY([out, retval] double *);
  281.     [propput, id(4), helpstring("property ScaleY")] HRESULT ScaleY([in] double);
  282.     [propget, id(5), helpstring("property OffsetX")] HRESULT OffsetX([out, retval] long *);
  283.     [propput, id(5), helpstring("property OffsetX")] HRESULT OffsetX([in] long);
  284.     [propget, id(6), helpstring("property OffsetY")] HRESULT OffsetY([out, retval] long *);
  285.     [propput, id(6), helpstring("property OffsetY")] HRESULT OffsetY([in] long);
  286.     [propget, id(7), helpstring("property ReplicateX")] HRESULT ReplicateX([out, retval] long *pVal);
  287.     [propput, id(7), helpstring("property ReplicateX")] HRESULT ReplicateX([in] long newVal);
  288.     [propget, id(8), helpstring("property ReplicateY")] HRESULT ReplicateY([out, retval] long *pVal);
  289.     [propput, id(8), helpstring("property ReplicateY")] HRESULT ReplicateY([in] long newVal);
  290.     [propget, id(9), helpstring("property BorderColor")] HRESULT BorderColor([out, retval] long *pVal);
  291.     [propput, id(9), helpstring("property BorderColor")] HRESULT BorderColor([in] long newVal);
  292.     [propget, id(10), helpstring("property BorderWidth")] HRESULT BorderWidth([out, retval] long *pVal);
  293.     [propput, id(10), helpstring("property BorderWidth")] HRESULT BorderWidth([in] long newVal);
  294.     [propget, id(11), helpstring("property BorderSoftness")] HRESULT BorderSoftness([out, retval] long *pVal);
  295.     [propput, id(11), helpstring("property BorderSoftness")] HRESULT BorderSoftness([in] long newVal);
  296.     HRESULT ApplyChanges();
  297.     HRESULT LoadDefSettings();
  298. };
  299.  
  300.     // key
  301.     [
  302.         object,
  303.         uuid(3255de56-38fb-4901-b980-94b438010d7b),
  304.         dual,
  305.         helpstring("IDxtKey Interface"),
  306.         pointer_default(unique)
  307.     ]
  308.     interface IDxtKey : IDXEffect
  309.     {
  310.         [propget, id(1), helpstring("property KeyType")]    HRESULT KeyType([out, retval] int *);
  311.         [propput, id(1), helpstring("property Keytype")]    HRESULT KeyType([in] int);
  312.         [propget, id(2), helpstring("property Hue")]   HRESULT Hue([out, retval] int *);
  313.         [propput, id(2), helpstring("property Hue")]   HRESULT Hue([in] int );
  314.         [propget, id(3), helpstring("property Luminance")]   HRESULT Luminance([out, retval] int *);
  315.         [propput, id(3), helpstring("property Luminance")]   HRESULT Luminance([in] int );
  316.         [propget, id(4), helpstring("property RGB")]    HRESULT RGB([out, retval] DWORD *);
  317.         [propput, id(4), helpstring("property RGB")]    HRESULT RGB([in] DWORD );
  318.         [propget, id(5), helpstring("property Similarity")]  HRESULT Similarity([out,retval] int * );
  319.         [propput, id(5), helpstring("property Similarity")]  HRESULT Similarity([in] int );
  320.         [propget, id(6), helpstring("property Invert")]    HRESULT Invert([out, retval] BOOL *);
  321.         [propput, id(6), helpstring("property Invert")]    HRESULT Invert([in] BOOL);
  322.     };
  323.  
  324.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  325.     // This little COM interface will look 'around' for the closest 
  326.     // path match for a given file. If the file already exists, then
  327.     // this interface should hardly do anything. If it's not found,
  328.     // it will go look for it and if successful, return S_FALSE. If it
  329.     // cannot find the file, it will call the hook, if set and return
  330.     // it's return code. if the hook is not set, it is in a type of
  331.     // error condition. The Dexter-provided MediaLocator will bring up
  332.     // a dialog box asking you to browse for your file. Other COM
  333.     // objects may do something else.
  334.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  335.  
  336. [
  337.     object,
  338.     uuid(288581E0-66CE-11d2-918F-00C0DF10D434),
  339.     odl,
  340.     helpstring("IMediaLocator Interface"),
  341.     pointer_default(unique)
  342. ]
  343. interface IMediaLocator : IUnknown
  344. {
  345.     // same flags as used by IRenderEngine's SetSourceNameValidation
  346.     HRESULT FindMediaFile( BSTR Input, BSTR FilterString, BSTR * pOutput, long Flags );
  347.     HRESULT AddFoundLocation( BSTR DirectoryName );
  348. };
  349.  
  350.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  351.     // This object provides caching of duration and stream type
  352.     // information for files that would produce a directshow source
  353.     // filter. It takes too long to figure this out in DShow right
  354.     // now, so this is one way around it. The way it works is that
  355.     // you first fill out the Filename property, then call and
  356.     // ask how many streams it has, or, set the CurrentStream prop
  357.     // and then ask for the per-stream properties, StreamType or
  358.     // StreamLength. They both reference the CurrentStream prop that
  359.     // you set. I also allowed you (for convenience) to just give
  360.     // it a IUnknown Filter that represents an IBaseFilter source
  361.     // filter that is NOT currently in a graph. It will use that
  362.     // instead. When using this, though, you will not get cached
  363.     // values. The cached values are stored in the system's ini file
  364.     // called DCBC2A70-70D8-4459-BFFA-E0D61DEA3FDF.INI. Nice, huh? :-)
  365.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  366.  
  367. [
  368.     object,
  369.     uuid(65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA),
  370.     odl,
  371.     helpstring("IMediaDet Interface"),
  372.     pointer_default(unique)
  373. ]
  374. interface IMediaDet : IUnknown
  375. {
  376.     [propget, id(1), helpstring("property Filter")] HRESULT Filter([out, retval] IUnknown* *pVal);
  377.     [propput, id(1), helpstring("property Filter")] HRESULT Filter([in] IUnknown* newVal);
  378.     [propget, id(2), helpstring("property OutputStreams")] HRESULT OutputStreams([out, retval] long *pVal);
  379.     [propget, id(3), helpstring("property CurrentStream")] HRESULT CurrentStream([out, retval] long *pVal);
  380.     [propput, id(3), helpstring("property CurrentStream")] HRESULT CurrentStream([in] long newVal);
  381.     [propget, id(4), helpstring("property StreamType")] HRESULT StreamType([out, retval] GUID *pVal);
  382.     [propget, id(5), helpstring("property StreamTypeB")] HRESULT StreamTypeB([out, retval] BSTR *pVal);
  383.     [propget, id(6), helpstring("property StreamLength")] HRESULT StreamLength([out, retval] double *pVal);
  384.     [propget, id(7), helpstring("property Filename")] HRESULT Filename([out, retval] BSTR *pVal);
  385.     [propput, id(7), helpstring("property Filename")] HRESULT Filename([in] BSTR newVal);
  386.     [id(8), helpstring("method GetBitmapBits")] HRESULT GetBitmapBits(double StreamTime, long * pBufferSize, char * pBuffer, long Width, long Height);
  387.     [id(9), helpstring("method WriteBitmapBits")] HRESULT WriteBitmapBits(double StreamTime, long Width, long Height, BSTR Filename );
  388.     [propget, id(10), helpstring("property StreamMediaType")] HRESULT StreamMediaType([out, retval] AM_MEDIA_TYPE * pVal);
  389.     [id(11), helpstring("method GetSampleGrabber")] HRESULT GetSampleGrabber( [out] ISampleGrabber ** ppVal );
  390.     [propget, id(12), helpstring("property FrameRate")] HRESULT FrameRate([out, retval] double *pVal);
  391.     [id(13), helpstring("method EnterBitmapGrabMode")] HRESULT EnterBitmapGrabMode( double SeekTime  );
  392. };
  393.  
  394.  
  395. // useless interface, don't use it!
  396.  
  397. [
  398.     object,
  399.     uuid(AE9472BE-B0C3-11D2-8D24-00A0C9441E20),
  400.     odl,
  401.     helpstring("IGrfCache Interface"),
  402.     pointer_default(unique)
  403. ]
  404. interface IGrfCache : IDispatch
  405. {
  406.     [id(1), helpstring("method AddFilter")] 
  407.     HRESULT AddFilter(
  408.         IGrfCache * ChainedCache,
  409.         LONGLONG ID, 
  410.         const IBaseFilter * pFilter, 
  411.         LPCWSTR pName);
  412.  
  413.     [id(2), helpstring("method ConnectPins")] 
  414.     HRESULT ConnectPins(
  415.         IGrfCache * ChainedCache,
  416.         LONGLONG PinID1, 
  417.         const IPin * pPin1, 
  418.         LONGLONG PinID2, 
  419.         const IPin * pPin2);
  420.  
  421.     [id(3), helpstring("method SetGraph")] 
  422.     HRESULT SetGraph(const IGraphBuilder * pGraph);
  423.  
  424.     [id(4), helpstring("method DoConnectionsNow")] 
  425.     HRESULT DoConnectionsNow();
  426. };
  427.  
  428.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  429.     // The RenderEngin builds a graph from the timeline and gives
  430.     // you some simple positional commands.
  431.     // explained methods:
  432.     // SetTimelineObject - tell the render engine who to parse
  433.     // ConnectEverything - build up a graph based on the timeline
  434.     // ScrapIt - throw away graph and everything
  435.     // GetFilterGraph - get the graph that's built up, if any
  436.     // SetFilterGraph - allows you to preset the graph that's built up.
  437.     //      cannot call this if there already is a graph.
  438.  
  439.     // !!! the following methods are unused/not implemented
  440.  
  441.     // SetInterestRange - discard COM objects and memory outside of this
  442.     //      range, if possible. Used for scrubbing on a long timeline and
  443.     //      freeing up resources
  444.     // SetRenderRange - pretend like a portion of the timeline IS the timeline
  445.     //      and don't connect anything in the graph outside of that range.
  446.     // Commit - allocate what's necessary and get prepared to run
  447.     // Decommit - free anything possible
  448.     // GetCaps - find out some info about the render engine
  449.     // DoSmartRecompression - connect compressed sources if 
  450.     //      possible
  451.     // in the graph, this will RenderPin( ) on every switcher 
  452.     //      rendering pin.
  453.     // SetSourceNameValidation - allows you to set some flags which
  454.     // determine how source files are found, if they need to be found.
  455.     //      FilterString is a list of extensions to find for the media
  456.     //      files (see OPENFILENAME filters)
  457.     //      pOverride is a media locator you would like to use instead
  458.     //      of the built in one
  459.     //      The flags are defined in the struct immediately below.
  460.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  461.  
  462. [
  463.     object,
  464.     uuid(6BEE3A81-66C9-11d2-918F-00C0DF10D434),
  465.     odl,
  466.     helpstring("IRenderEngine Interface"),
  467.     pointer_default(unique)
  468. ]
  469. interface IRenderEngine : IUnknown
  470. {
  471.     HRESULT SetTimelineObject( IAMTimeline * pTimeline );
  472.     HRESULT GetTimelineObject( [out] IAMTimeline ** ppTimeline );
  473.     HRESULT GetFilterGraph( [out] IGraphBuilder ** ppFG );
  474.     HRESULT SetFilterGraph( IGraphBuilder * pFG );
  475.     HRESULT SetInterestRange( REFERENCE_TIME Start, REFERENCE_TIME Stop );
  476.     HRESULT SetInterestRange2( double Start, double Stop );
  477.     HRESULT SetRenderRange( REFERENCE_TIME Start, REFERENCE_TIME Stop );
  478.     HRESULT SetRenderRange2( double Start, double Stop );
  479.     HRESULT GetGroupOutputPin( long Group, [out] IPin ** ppRenderPin );
  480.     HRESULT ScrapIt( );
  481.     HRESULT RenderOutputPins( );
  482.     HRESULT GetVendorString( [out,retval] BSTR * pVendorID );
  483.     HRESULT ConnectFrontEnd( );
  484.     HRESULT SetSourceConnectCallback( IGrfCache * pCallback );
  485.     HRESULT SetDynamicReconnectLevel( long Level );
  486.     HRESULT DoSmartRecompression( );
  487.     HRESULT UseInSmartRecompressionGraph( );
  488.  
  489.     HRESULT SetSourceNameValidation( BSTR FilterString, IMediaLocator * pOverride, LONG Flags );
  490.  
  491.     // not implemented yet
  492.     HRESULT Commit( );
  493.     HRESULT Decommit( );
  494.     HRESULT GetCaps( long Index, long * pReturn );
  495. };
  496.  
  497. [
  498.     object,
  499.     uuid(6BEE3A82-66C9-11d2-918F-00C0DF10D434),
  500.     odl,
  501.     helpstring("IRenderEngine2 Interface"),
  502.     pointer_default(unique)
  503. ]
  504. interface IRenderEngine2 : IUnknown
  505. {
  506.     HRESULT SetResizerGUID( GUID ResizerGuid );
  507. }
  508.  
  509. // used for the smart render engine when it needs to find a compressor
  510. [
  511.     object,
  512.     uuid(F03FA8DE-879A-4d59-9B2C-26BB1CF83461),
  513.     odl,
  514.     helpstring("IFindCompressorCB Interface"),
  515.     pointer_default(unique)
  516. ]
  517. interface IFindCompressorCB : IUnknown
  518. {
  519.     HRESULT GetCompressor( AM_MEDIA_TYPE * pType, AM_MEDIA_TYPE * pCompType, [out] IBaseFilter ** ppFilter );
  520. }
  521.  
  522. [
  523.     object,
  524.     uuid(F03FA8CE-879A-4d59-9B2C-26BB1CF83461),
  525.     odl,
  526.     helpstring("ISmartRenderEngine Interface"),
  527.     pointer_default(unique)
  528. ]
  529. interface ISmartRenderEngine : IUnknown
  530. {
  531.     HRESULT SetGroupCompressor( long Group, IBaseFilter * pCompressor );
  532.     HRESULT GetGroupCompressor( long Group, IBaseFilter ** pCompressor );
  533.     HRESULT SetFindCompressorCB( IFindCompressorCB * pCallback );
  534. }                  
  535.  
  536. ////////////////////////////////////////////////////////////////
  537. ////////////////////////////////////////////////////////////////
  538. // TIMELINE TIMELINE TIMELINE TIMELINE TIMELINE TIMELINE
  539. ////////////////////////////////////////////////////////////////
  540. ////////////////////////////////////////////////////////////////
  541.  
  542.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  543.     // Every object on the timeline supports at least this interface.
  544.     // explained methods:
  545.     // Get/SetStartStop - the timeline times at which this object is
  546.     //      active. Groups and Tracks have start times of zero.
  547.     // FixTimes - used by the render engine. Rounds the input times
  548.     //      to the nearest FPS of the parent Group, for use in setting
  549.     //      up the big switch.
  550.     // GetSubObject - get the sub-object which is associated with this
  551.     //      timeline object. Each timeline object can carry around a
  552.     //      pointer to 'something else'. For our Render Engine, this is
  553.     //      a pointer to a filter that gets put into a graph. 
  554.     // NOTE: Getting the subobject will FORCE it to load if it's possible
  555.     //      to force this. If you don't want it to do this, don't call
  556.     //      this function.
  557.     // SetSubObject - see GetSubObject
  558.     // SetSubObjectGUID - instead of giving the node a pointer, you can
  559.     //      instead give it a GUID and see if this works instead. The
  560.     //      sub-object will attempt to be instantiated when 'necessary'
  561.     //      which is really when it's asked for with GetSubObject./
  562.     //      !!! a better way to do this perhaps?
  563.     // GetSubObjectLoaded - ask if the sub-object pointer is set
  564.     // Get/SetTimelineType - return the major type which is stored here,
  565.     //      used by the API user and the render engine.
  566.     // Get/SetTimelineSubType - see above
  567.     // Get/SetUserID - get and set a number, any number
  568.     // GetGenID - every created object has a unique number to it. Used
  569.     //      by the render engine.
  570.     // Get/SetUserName - a storable name, for users of the API
  571.     // Get/SetPropertySetter - the object that will set properties for this
  572.     //      object (it will support IPropertySetter and it is created by 
  573.     //      CPropertySetter)
  574.     // Get/SetUserData - gets the persistant data used by the user of
  575.     //      the API.
  576.     // Get/SetMuted - set whether this object should be active or not.
  577.     //      Setting a parent of other objects off also turns off the
  578.     //      sub-objects.
  579.     // Get/SetLocked - set whether you can edit this object or not.
  580.     //      Note: the timeline doesn't enforce this, it just stores
  581.     //      a value for convenience.
  582.     // Get/SetDirtyRange - 
  583.     // RemoveAll - remove this object, and if in the tree already, all it's
  584.     //        sub objects, including children
  585.     // Remove - remove this object, and if in the tree already, all it's
  586.     //        sub objects, but not kids
  587.     // GetTimelineNoRef - called internally by the timeline.
  588.     // GetGroupIBelongTo - called internally by the timeline.
  589.     // GetEmbedDepth - find out how many tracks we are a part of
  590.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  591.  
  592. [
  593.     object,
  594.     local,
  595.     uuid(78530B77-61F9-11D2-8CAD-00A024580902),
  596.     odl,
  597.     helpstring("IAMTimelineObj Interface"),
  598.     pointer_default(unique)
  599. ]
  600. interface IAMTimelineObj : IUnknown
  601. {
  602.     [helpstring("method GetStartStop")] 
  603.     HRESULT GetStartStop(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  604.     [helpstring("method GetStartStop2")] 
  605.     HRESULT GetStartStop2(REFTIME * pStart, REFTIME * pStop);
  606.     [helpstring("method FixTimes")] 
  607.     HRESULT FixTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  608.     [helpstring("method FixTimes2")] 
  609.     HRESULT FixTimes2(REFTIME * pStart, REFTIME * pStop);
  610.     [helpstring("method SetStartStop")] 
  611.     HRESULT SetStartStop(REFERENCE_TIME Start, REFERENCE_TIME Stop);
  612.     [helpstring("method SetStartStop2")] 
  613.     HRESULT SetStartStop2(REFTIME Start, REFTIME Stop);
  614.     [helpstring("method GetPropertySetter")] 
  615.     HRESULT GetPropertySetter([out,retval] IPropertySetter* *pVal);
  616.     [helpstring("method SetPropertySetter")] 
  617.     HRESULT SetPropertySetter(IPropertySetter* newVal);
  618.     [helpstring("method GetSubObject")] 
  619.     HRESULT GetSubObject([out,retval] IUnknown* *pVal);
  620.     [helpstring("method SetSubObject")] 
  621.     HRESULT SetSubObject(IUnknown* newVal);
  622.     [helpstring("method SetSubObjectGUID")] 
  623.     HRESULT SetSubObjectGUID(GUID newVal);
  624.     [helpstring("method SetSubObjectGUIDByBSTR")] 
  625.     HRESULT SetSubObjectGUIDB(BSTR newVal);
  626.     [helpstring("method GetSubObjectGUID")] 
  627.     HRESULT GetSubObjectGUID(GUID * pVal);
  628.     [helpstring("method GetSubObjectGUIDByBSTR")] 
  629.     HRESULT GetSubObjectGUIDB([out,retval] BSTR * pVal);
  630.     [helpstring("method GetSubObjectLoaded")] 
  631.     HRESULT GetSubObjectLoaded(BOOL * pVal);
  632.     [helpstring("method GetTimelineType")] 
  633.     HRESULT GetTimelineType(TIMELINE_MAJOR_TYPE * pVal);
  634.     [helpstring("method SetTimelineType")] 
  635.     HRESULT SetTimelineType(TIMELINE_MAJOR_TYPE newVal);
  636.     [helpstring("method GetUserID")] 
  637.     HRESULT GetUserID(long * pVal);
  638.     [helpstring("method SetUserID")] 
  639.     HRESULT SetUserID(long newVal);
  640.     [helpstring("method GetGenID")] 
  641.     HRESULT GetGenID( long * pVal );
  642.     [helpstring("method GetUserName")] 
  643.     HRESULT GetUserName([out,retval] BSTR * pVal);
  644.     [helpstring("method SetUserName")] 
  645.     HRESULT SetUserName(BSTR newVal);
  646.     [helpstring("method GetUserData")] 
  647.     HRESULT GetUserData(BYTE * pData, long * pSize);
  648.     [helpstring("method SetUserData")] 
  649.     HRESULT SetUserData(BYTE * pData, long Size);
  650.     [helpstring("method GetMuted")] 
  651.     HRESULT GetMuted(BOOL * pVal);
  652.     [helpstring("method SetMuted")] 
  653.     HRESULT SetMuted(BOOL newVal);
  654.     [helpstring("method GetLocked")] 
  655.     HRESULT GetLocked(BOOL * pVal);
  656.     [helpstring("method SetLocked")] 
  657.     HRESULT SetLocked(BOOL newVal);
  658.     [helpstring("method GetDirtyRange")] 
  659.     HRESULT GetDirtyRange(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  660.     [helpstring("method GetDirtyRange")] 
  661.     HRESULT GetDirtyRange2(REFTIME * pStart, REFTIME * pStop);
  662.     [helpstring("method SetDirtyRange")] 
  663.     HRESULT SetDirtyRange(REFERENCE_TIME Start, REFERENCE_TIME Stop);
  664.     [helpstring("method SetDirtyRange")] 
  665.     HRESULT SetDirtyRange2(REFTIME Start, REFTIME Stop);
  666.     [helpstring("method ClearDirty")] 
  667.     HRESULT ClearDirty( );
  668.     [helpstring("method Remove")] 
  669.     HRESULT Remove();
  670.     [helpstring("method RemoveAll")] 
  671.     HRESULT RemoveAll();
  672.     HRESULT GetTimelineNoRef( IAMTimeline ** ppResult );
  673.     HRESULT GetGroupIBelongTo( [out] IAMTimelineGroup ** ppGroup );
  674.     HRESULT GetEmbedDepth( long * pVal );
  675. };
  676.  
  677.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  678.     // Any object on the timeline that can have an effect put on it 
  679.     // implements this interface. This includes sources, tracks, and
  680.     // compositions.
  681.     // explained methods:
  682.     // EffectInsBefore - insert an effect at the given priority onto
  683.     //      this object. The effect's times will be clipped within
  684.     //      this object's bounds. Use -1 to specify 'at the end' for priority.
  685.     //      You cannot have two effects at the same priority.
  686.     // EffectSwapPriorities - swaparoo two effects. Makes undo easier to
  687.     //      implement.
  688.     // EffectGetCount - get how many effects are applied to this object.
  689.     // GetEffect - get the nth effect applied to this object
  690.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  691.  
  692. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  693. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  694.  
  695. [
  696.     object,
  697.     uuid(EAE58537-622E-11d2-8CAD-00A024580902),
  698.     odl,
  699.     helpstring("IAMTimelineEffectable Interface"),
  700.     pointer_default(unique)
  701. ]
  702. interface IAMTimelineEffectable : IUnknown
  703. {
  704.     [helpstring("method EffectInsBefore")] 
  705.     HRESULT EffectInsBefore(IAMTimelineObj * pFX, long priority);
  706.     [helpstring("method EffectSwapPriorities")] 
  707.     HRESULT EffectSwapPriorities(long PriorityA, long PriorityB);
  708.     [helpstring("method EffectGetCount")] 
  709.     HRESULT EffectGetCount(long * pCount);
  710.     [helpstring("method GetEffect")] 
  711.     HRESULT GetEffect([out] IAMTimelineObj ** ppFx, long Which);
  712. };
  713.  
  714.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  715.     // Any effect on the timeline will support at least this interface.
  716.     // NOTE: The Start/Stop times on this object are RELATIVE to their
  717.     // parent's, as are all start/stop times.
  718.     // explained methods:
  719.     // EffectGetPriority - finds out this effect's priority related to the others.
  720.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  721.  
  722. [
  723.     object,
  724.     uuid(BCE0C264-622D-11d2-8CAD-00A024580902),
  725.     odl,
  726.     helpstring("IAMTimelineEffect Interface"),
  727.     pointer_default(unique)
  728. ]
  729. interface IAMTimelineEffect : IUnknown
  730. {
  731.     [helpstring("method EffectGetPriority")] 
  732.     HRESULT EffectGetPriority(long * pVal);
  733. };
  734.  
  735.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  736.     // Any object on the timeline that can have a transition put on it
  737.     // implements this interface
  738.     // explained methods:
  739.     // TransAdd - add a transition on this object. Multiple trans's on 
  740.     //      the same object cannot overlap in time. Transitions' times
  741.     //      must lie within the bounds of their parent.
  742.     // TransGetCount - get how many transitions are applied to this
  743.     //      object.
  744.     // GetNextTrans - given a time, get the next transition that happens
  745.     //      on this object after that time. On exit, the input time is
  746.     //      set to the start time of the transition.
  747.     // GetTransAtTime - find a transition forwards or backwards from
  748.     //        a given spot. See DEXTERF_TRACK_SEARCH_FLAGS enum.
  749.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  750.  
  751. [
  752.     object,
  753.     uuid(378FA386-622E-11d2-8CAD-00A024580902),
  754.     odl,
  755.     helpstring("IAMTimelineTransable Interface"),
  756.     pointer_default(unique)
  757. ]
  758. interface IAMTimelineTransable : IUnknown
  759. {
  760.     [helpstring("method TransAdd")] 
  761.     HRESULT TransAdd(IAMTimelineObj * pTrans);
  762.     [helpstring("method TransGetCount")] 
  763.     HRESULT TransGetCount(long * pCount);
  764.     [helpstring("method GetNextTrans")] 
  765.     HRESULT GetNextTrans([out] IAMTimelineObj ** ppTrans, REFERENCE_TIME * pInOut);
  766.     [helpstring("method GetNextTrans2")] 
  767.     HRESULT GetNextTrans2([out] IAMTimelineObj ** ppTrans, REFTIME * pInOut);
  768.     [helpstring("method GetTransAtTime")] 
  769.     HRESULT GetTransAtTime(
  770.         [out] IAMTimelineObj ** ppObj, 
  771.         REFERENCE_TIME Time, 
  772.         long SearchDirection ); 
  773.     [helpstring("method GetTransAtTime2")] 
  774.     HRESULT GetTransAtTime2([out] IAMTimelineObj ** ppObj, REFTIME Time, long SearchDirection ); 
  775. };
  776.  
  777.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  778.     // Any object on the timeline that can be split into two will
  779.     // implement this interface. Namely, source, effects, and transitions
  780.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  781.  
  782. [
  783.     object,
  784.     uuid(A0F840A0-D590-11d2-8D55-00A0C9441E20),
  785.     odl,
  786.     helpstring("IAMTimelineSplittable Interface"),
  787.     pointer_default(unique)
  788. ]
  789. interface IAMTimelineSplittable : IUnknown
  790. {
  791.     HRESULT SplitAt(REFERENCE_TIME Time);
  792.     HRESULT SplitAt2(REFTIME Time);
  793. };
  794.  
  795.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  796.     // Any trans on the timeline will support at least this interface.
  797.     // NOTE: The Start/Stop times on this object are RELATIVE to their
  798.     // parent's, as are all start/stop times.
  799.     // explained methods:
  800.     // GetCutPoint - get where this transition should cut from A to B
  801.     //      if the transition were not applied.
  802.     // GetA2B - get if this transition is to go from A->B or B->A.
  803.     // GetBackwards - get if this transition should run backwards.
  804.     // GetCutsOnly - force no transition, force doing a cut
  805.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  806.  
  807. [
  808.     object,
  809.     uuid(BCE0C265-622D-11d2-8CAD-00A024580902),
  810.     odl,
  811.     helpstring("IAMTimelineTrans Interface"),
  812.     pointer_default(unique)
  813. ]
  814. interface IAMTimelineTrans : IUnknown
  815. {
  816.     [helpstring("method GetCutPoint")] 
  817.     HRESULT GetCutPoint(REFERENCE_TIME * pTLTime);
  818.     [helpstring("method GetCutPoint2")] 
  819.     HRESULT GetCutPoint2(REFTIME * pTLTime);
  820.     [helpstring("method SetCutPoint")] 
  821.     HRESULT SetCutPoint(REFERENCE_TIME TLTime);
  822.     [helpstring("method SetCutPoint2")]
  823.     HRESULT SetCutPoint2(REFTIME TLTime);
  824.     [helpstring("method GetSwapInputs")] 
  825.     HRESULT GetSwapInputs( BOOL * pVal );
  826.     [helpstring("method SetSwapInputs")] 
  827.     HRESULT SetSwapInputs( BOOL pVal );
  828.     [helpstring("method GetCutsOnly")] 
  829.     HRESULT GetCutsOnly( BOOL * pVal );
  830.     [helpstring("method SetCutsOnly")] 
  831.     HRESULT SetCutsOnly( BOOL pVal );
  832. };
  833.  
  834.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  835.     // Sources represent any source media object on the timeline.
  836.     // They extend an IAMTimelineObj to include media start and stop
  837.     // times, a media name (which could represent darned near anything),
  838.     // and a StreamNumber, which defines which stream out of a potential
  839.     // many this stream represents from a source clip.
  840.     // explained methods:
  841.     // ModifyStopTime - like calling SetStartStop, but this method just
  842.     //      adjusts the tail end of the clip.
  843.     // FixMediaTimes - called by the render engine to round times to
  844.     //      this source clip's parent group's FPS.
  845.     // SpliceWithNext - if the next clip after this is the same source
  846.     //      and this's stop time matches next's start time, the two
  847.     //      will be joined.
  848.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  849.  
  850. [
  851.     object,
  852.     uuid(78530B79-61F9-11D2-8CAD-00A024580902),
  853.     odl,
  854.     helpstring("IAMTimelineSrc Interface"),
  855.     pointer_default(unique)
  856. ]
  857. interface IAMTimelineSrc : IUnknown
  858. {
  859.     [helpstring("method GetMediaTimes")] 
  860.     HRESULT GetMediaTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  861.     [helpstring("method GetMediaTimes2")] 
  862.     HRESULT GetMediaTimes2(REFTIME * pStart, REFTIME * pStop);
  863.     [helpstring("method ModifyStopTime")] 
  864.     HRESULT ModifyStopTime(REFERENCE_TIME Stop);
  865.     [helpstring("method ModifyStopTime2")] 
  866.     HRESULT ModifyStopTime2(REFTIME Stop);
  867.     [helpstring("method FixMediaTimes")] 
  868.     HRESULT FixMediaTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  869.     [helpstring("method FixMediaTimes2")] 
  870.     HRESULT FixMediaTimes2(REFTIME * pStart, REFTIME * pStop);
  871.     [helpstring("method SetMediaTimes")] 
  872.     HRESULT SetMediaTimes(REFERENCE_TIME Start, REFERENCE_TIME Stop);
  873.     [helpstring("method SetMediaTimes2")] 
  874.     HRESULT SetMediaTimes2(REFTIME Start, REFTIME Stop);
  875.     [helpstring("method SetMediaLength")] 
  876.     HRESULT SetMediaLength(REFERENCE_TIME Length);
  877.     [helpstring("method SetMediaLength2")] 
  878.     HRESULT SetMediaLength2(REFTIME Length);
  879.     [helpstring("method GetMediaLength")] 
  880.     HRESULT GetMediaLength(REFERENCE_TIME * pLength);
  881.     [helpstring("method GetMediaLength2")] 
  882.     HRESULT GetMediaLength2(REFTIME * pLength);
  883.     [helpstring("method GetMediaName")] 
  884.     HRESULT GetMediaName([out,retval] BSTR * pVal);
  885.     [helpstring("method SetMediaName")] 
  886.     HRESULT SetMediaName(BSTR newVal);
  887.     [helpstring("method SpliceWithNext")] 
  888.     HRESULT SpliceWithNext(IAMTimelineObj * pNext);
  889.     [helpstring("method GetStreamNumber")] 
  890.     HRESULT GetStreamNumber(long * pVal);
  891.     [helpstring("method SetStreamNumber")] 
  892.     HRESULT SetStreamNumber(long Val);
  893.     HRESULT IsNormalRate( BOOL * pVal );
  894.  
  895.     // If a source can't figure out its frames per second, this number
  896.     // will be used (eg: Dib sequences).  AVI, MPEG, etc. will not need this
  897.     // Use 0 fps to prevent a filename like "ski4.jpg" from using a dib seq
  898.     [helpstring("method GetDefaultFPS")] 
  899.     HRESULT GetDefaultFPS(double * pFPS);
  900.     [helpstring("method SetDefaultFPS")] 
  901.     HRESULT SetDefaultFPS(double FPS);
  902.  
  903.     // !!! This is video specific.. new interface?
  904.     // what kind of stretching? Stretch, crop, or preserve aspect ratio?
  905.     [helpstring("method GetStretchMode")] 
  906.     HRESULT GetStretchMode(int * pnStretchMode);
  907.     [helpstring("method SetStretchMode")] 
  908.     HRESULT SetStretchMode(int nStretchMode);
  909. };
  910.  
  911.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  912.     // Tracks are things that can contain media in them. You can add
  913.     // and remove sources, effects, and transitions from them. Sources
  914.     // are added according to the current insert mode of the timeline.
  915.     // If in OVERLAY mode, moving or adding a source to a time that's
  916.     // already occupied by another source will wipe out any overlapping
  917.     // portion of the underlying source. In InsertMode, everything at
  918.     // the insert point is moved down in time to make room for the
  919.     // new source.
  920.     // explained methods:
  921.     // SrcAdd - add the source to this track. The source's start/stop
  922.     //      times must be set up first.
  923.     // GetNextSrc - pass a time in at which you wish to find a source
  924.     //      and it will return the first source which occurs after the 
  925.     //      given time.
  926.     // MoveEverythingBy - bump a bunch of objects a certain direction
  927.     //      on the track by a given time.
  928.     // GetSourcesCount - how many sources are on this track?
  929.     // AreYouBlank - do you contain anything at all?
  930.     // GetSrcAtTime - find a source at a given time. SearchDirection
  931.     //      is which way to search. -1 = backwards, 1 = forwards
  932.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  933.  
  934. [
  935.     object,
  936.     uuid(EAE58538-622E-11d2-8CAD-00A024580902),
  937.     odl,
  938.     helpstring("IAMTimelineTrack Interface"),
  939.     pointer_default(unique)
  940. ]
  941. interface IAMTimelineTrack : IUnknown
  942. {
  943.     [helpstring("method SrcAdd")] 
  944.     HRESULT SrcAdd(IAMTimelineObj * pSource);
  945.     [helpstring("method GetNextSrc")] 
  946.     HRESULT GetNextSrc([out] IAMTimelineObj ** ppSrc, REFERENCE_TIME * pInOut);
  947.     [helpstring("method GetNextSrc2")] 
  948.     HRESULT GetNextSrc2([out] IAMTimelineObj ** ppSrc, REFTIME * pInOut);
  949.     [helpstring("method MoveEverythingBy")] 
  950.     HRESULT MoveEverythingBy( REFERENCE_TIME Start, REFERENCE_TIME MoveBy );
  951.     [helpstring("method MoveEverythingBy2")] 
  952.     HRESULT MoveEverythingBy2( REFTIME Start, REFTIME MoveBy );
  953.     [helpstring("method GetSourcesCount")] 
  954.     HRESULT GetSourcesCount( long * pVal );
  955.     [helpstring("method AreYouBlank")] 
  956.     HRESULT AreYouBlank( long * pVal );
  957.     [helpstring("method GetSrcAtTime")] 
  958.     HRESULT GetSrcAtTime(
  959.         [out] IAMTimelineObj ** ppSrc, 
  960.         REFERENCE_TIME Time, 
  961.         long SearchDirection ); 
  962.     [helpstring("method GetSrcAtTime2")] 
  963.     HRESULT GetSrcAtTime2([out] IAMTimelineObj ** ppSrc, REFTIME Time, long SearchDirection ); 
  964.     HRESULT InsertSpace( REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd );
  965.     HRESULT InsertSpace2( REFTIME rtStart, REFTIME rtEnd );
  966.     HRESULT ZeroBetween( REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd );
  967.     HRESULT ZeroBetween2( REFTIME rtStart, REFTIME rtEnd );
  968.     HRESULT GetNextSrcEx(IAMTimelineObj * pLast, [out] IAMTimelineObj **ppNext);
  969. };
  970.  
  971.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  972.     // This virtual track interface is shared by both the compositions
  973.     // and tracks (and groups). 
  974.     // explained methods:
  975.     // TrackGetPriority - used by rendering objects which need to know this.
  976.     // SetTrackDirty - !!! not sure if this is useful.
  977.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  978.  
  979. [
  980.     object,
  981.     uuid(A8ED5F80-C2C7-11d2-8D39-00A0C9441E20),
  982.     odl,
  983.     helpstring("IAMTimelineVirtualTrack Interface"),
  984.     pointer_default(unique)
  985. ]
  986. interface IAMTimelineVirtualTrack : IUnknown
  987. {
  988.     [helpstring("method TrackGetPriority")] 
  989.     HRESULT TrackGetPriority(long * pPriority);
  990.     [helpstring("method SetTrackDirty")] 
  991.     HRESULT SetTrackDirty( );
  992. };
  993.  
  994.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  995.     // Compositions are like tracks in the sense that they also
  996.     // implement IAMVirtualTrack and you can put transitions and effects
  997.     // on them, but they really are the SUM of those tracks that they
  998.     // contain. They are "embedded" compositions. They should only contain
  999.     // media of one particular type (like all video or all audio), but 
  1000.     // this is not enforced. You can add a composition to another
  1001.     // composition with VTrackInsBefore, just like you can add a track.
  1002.     // The very top composition to which all other comps and tracks belong
  1003.     // is a Group, which supports I-AMTimelineGroup as well as I-AMTimelineComp.
  1004.     // explained methods:
  1005.     // VTrackInsBefore - does NOT mean VideoTrack. Means Virtual Track.
  1006.     //      Adds a virtual track to a composition at a given priority.
  1007.     //      use -1 to mean "at the end"
  1008.     // VTrackSwapPriorities - switch two vtracks around.
  1009.     // VTrackGetCount - get how many vtracks this comp contains.
  1010.     // GetVTrack - you get the idea
  1011.     // GetCountOfType - Get the total number of these objects this comp
  1012.     //      and all it's vtracks (recursively) contains. !!! this may be dead.
  1013.     // GetRecursiveLayerOfType - given a number, returns a given track. This
  1014.     //      is done recursively. You need to pass in a pointer to the number,
  1015.     //        and it will be modified upon exit to an unknown value. DO NOT
  1016.     //      CALL THE VERSION WITH THE POINTER!
  1017.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1018.  
  1019. [
  1020.     object,
  1021.     uuid(EAE58536-622E-11d2-8CAD-00A024580902),
  1022.     odl,
  1023.     helpstring("IAMTimelineComp Interface"),
  1024.     pointer_default(unique)
  1025. ]
  1026. interface IAMTimelineComp : IUnknown
  1027. {
  1028.     [helpstring("method VTrackInsBefore")] 
  1029.     HRESULT VTrackInsBefore(IAMTimelineObj * pVirtualTrack, long Priority);
  1030.     [helpstring("method VTrackSwapPriorities")] 
  1031.     HRESULT VTrackSwapPriorities(long VirtualTrackA, long VirtualTrackB);
  1032.     [helpstring("method VTrackGetCount")] 
  1033.     HRESULT VTrackGetCount(long * pVal);
  1034.     [helpstring("method GetVTrack")] 
  1035.     HRESULT GetVTrack([out] IAMTimelineObj ** ppVirtualTrack, long Which);
  1036.     [helpstring("method GetCountOfType")] 
  1037.     HRESULT GetCountOfType(long * pVal, long * pValWithComps, TIMELINE_MAJOR_TYPE MajorType );
  1038.     [helpstring("method GetRecursiveLayerOfType")] 
  1039.     HRESULT GetRecursiveLayerOfType(
  1040.         [out] IAMTimelineObj ** ppVirtualTrack, 
  1041.         long WhichLayer, 
  1042.         TIMELINE_MAJOR_TYPE Type);
  1043.     [helpstring("method GetRecursiveLayerOfTypeI (do not call)")] 
  1044.     HRESULT GetRecursiveLayerOfTypeI(
  1045.         [out] IAMTimelineObj ** ppVirtualTrack, 
  1046.         [in,out] long * pWhichLayer, 
  1047.         TIMELINE_MAJOR_TYPE Type);
  1048.     HRESULT GetNextVTrack(IAMTimelineObj *pVirtualTrack, [out] IAMTimelineObj **ppNextVirtualTrack);
  1049. };
  1050.  
  1051.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1052.     // Groups represent the topmost composition in a timeline. Every
  1053.     // group should contain media of only one major type (like all video).
  1054.     // The timeline can contain multiple groups, see it's interface for
  1055.     // this. Each group has a particular "media type" that you can get/set
  1056.     // which help identify it. Each group has an associated FPS which
  1057.     // is used by the render engine in setting up the big switch. All
  1058.     // cuts on the timeline will happen rounded to this nearest FPS for
  1059.     // this particular group. Each group has a priority which enables
  1060.     // writing out multiple-stream files with 1 or more streams of the
  1061.     // same type. (Like a 2 video stream AVI file).
  1062.     // explained methods:
  1063.     // SetTimeline - this is called internally when the group is added.
  1064.     //      Do not call this.
  1065.     // GetTimeline - get the timeline this group belongs to.
  1066.     // GetPriority - get this group's priority
  1067.     // Get/SetOutputFPS - explained above
  1068.     // SetMediaTypeForVB - method for VB. Pass in 0 for video, 1 for audio
  1069.     // SetRecompFormatFromSource - set the recompress format based on the
  1070.     //  source that's loaded or set in the IAMTimelineSrc
  1071.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1072.  
  1073. [
  1074.     object,
  1075.     uuid(9EED4F00-B8A6-11d2-8023-00C0DF10D434),
  1076.     odl,
  1077.     helpstring("IAMTimelineGroup Interface"),
  1078.     pointer_default(unique)
  1079. ]
  1080. interface IAMTimelineGroup : IUnknown
  1081. {
  1082.     [helpstring("method SetTimeline")] 
  1083.     HRESULT SetTimeline( IAMTimeline * pTimeline );
  1084.     [helpstring("method GetTimeline")] 
  1085.     HRESULT GetTimeline( [out] IAMTimeline ** ppTimeline );
  1086.     [helpstring("method GetPriority")] 
  1087.     HRESULT GetPriority( long * pPriority );
  1088.     [helpstring("method GetMediaType")] 
  1089.     HRESULT GetMediaType([out] AM_MEDIA_TYPE *);
  1090.     [helpstring("method SetMediaType")] 
  1091.     HRESULT SetMediaType([in] AM_MEDIA_TYPE *);
  1092.     [helpstring("method SetOutputFPS")] 
  1093.     HRESULT SetOutputFPS(double FPS);
  1094.     [helpstring("method GetOutputFPS")] 
  1095.     HRESULT GetOutputFPS(double * pFPS);
  1096.     [helpstring("method SetGroupName")] 
  1097.     HRESULT SetGroupName( BSTR pGroupName );
  1098.     [helpstring("method GetGroupName")] 
  1099.     HRESULT GetGroupName( [out,retval] BSTR * pGroupName );
  1100.     // in preview mode, skip frames.  In authoring mode, don't
  1101.     [helpstring("method SetPreviewMode")] 
  1102.     HRESULT SetPreviewMode( BOOL fPreview );
  1103.     [helpstring("method GetPreviewMode")] 
  1104.     HRESULT GetPreviewMode( BOOL *pfPreview );
  1105.     [helpstring("method SetMediaTypeForVB")] 
  1106.     HRESULT SetMediaTypeForVB([in] long Val );
  1107.     // how many frames ahead switch can run
  1108.     [helpstring("method GetOutputBuffering")] 
  1109.     HRESULT GetOutputBuffering([out] int *pnBuffer );
  1110.     [helpstring("method SetOutputBuffering")] 
  1111.     HRESULT SetOutputBuffering([in] int nBuffer );
  1112.  
  1113.     HRESULT SetSmartRecompressFormat( long * pFormat );
  1114.     HRESULT GetSmartRecompressFormat( long ** ppFormat );
  1115.     HRESULT IsSmartRecompressFormatSet( BOOL * pVal );
  1116.     HRESULT IsRecompressFormatDirty( BOOL * pVal );
  1117.     HRESULT ClearRecompressFormatDirty( );
  1118.     HRESULT SetRecompFormatFromSource( IAMTimelineSrc * pSource );
  1119. };
  1120.  
  1121.  
  1122.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1123.     // The main timeline. This is the base object you use to set
  1124.     // properties of the timeline as a whole, and to create blank
  1125.     // objects for use within the timeline. You cannot create the
  1126.     // objects using COM methods, you must go through the timeline to
  1127.     // create this. That's because certain information is set before
  1128.     // handing the object back to you. Every object created by the
  1129.     // timeline will support at LEAST IAMTimelineObj. For any timeline,
  1130.     // it can have one or more "groups" that it knows about. Each group
  1131.     // has the capability to hold a complete sub-tree containing media
  1132.     // that is all of one type. This logical seperation is used for the
  1133.     // rendering engine, but is not strictly enforced.
  1134.     // explained methods:
  1135.     // CreateEmptyNode - pass in a mid type and it will pass back
  1136.     //      an object of the type you requested.
  1137.     // AddGroup - add a created group to the tree
  1138.     // RemGroupFromList - make sure timeline no longer knows about this group.
  1139.     //        does NOT do anything to the group itself. Normally the user
  1140.     //        does not want to call this, it's called from the Group's Remove( ) method.
  1141.     // GetGroup - get a certain group
  1142.     // GetGroupCount - get how many groups
  1143.     // ClearAllGroups - clear everything
  1144.     // GetInsertMode - ask what the insert mode is, overlay or insert
  1145.     // SetInsertMode - set whether to insert or overlay
  1146.     // EnableTransitions - turn transitions on or off as a whole
  1147.     // EnableEffects - same deal.
  1148.     // SetIntererstRange - discard sub-objects outside of a given
  1149.     //      time range, to save memory/resources
  1150.     // Get/SetDefaultFPS - set the 'default' FPS for this timeline,
  1151.     //      the RenderEngine reads this information for setting itself up
  1152.     //      by default.
  1153.     // GetCountOfType - ask for how many of a given thing are in a given
  1154.     //      group. !!! this may be a useless function.
  1155.     // !!! not implemented
  1156.     // IsDirty - asks if anything in the timeline needs to be redrawn
  1157.     // GetDirtyRange - same deal
  1158.     // ValidateSourceNames - make sure the filenames in the sources
  1159.     //      really exist. Use the same enum flags as the render engine
  1160.     //      uses for SetSourceNameValidation. Source's filenames will be
  1161.     //      changed to those of the found ones in the timeline.
  1162.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1163.  
  1164. [
  1165.     object,
  1166.     uuid(78530B74-61F9-11D2-8CAD-00A024580902),
  1167.     odl,
  1168.     helpstring("IAMTimeline Interface"),
  1169.     pointer_default(unique)
  1170. ]
  1171. interface IAMTimeline : IUnknown
  1172. {
  1173.     [helpstring("method CreateEmptyNode")] 
  1174.     HRESULT CreateEmptyNode([out] IAMTimelineObj ** ppObj, TIMELINE_MAJOR_TYPE Type );
  1175.     HRESULT AddGroup( IAMTimelineObj * pGroup );
  1176.     HRESULT RemGroupFromList( IAMTimelineObj * pGroup );
  1177.     HRESULT GetGroup( [out] IAMTimelineObj ** ppGroup, long WhichGroup );
  1178.     HRESULT GetGroupCount( long * pCount );
  1179.     HRESULT ClearAllGroups( );
  1180.     HRESULT GetInsertMode( long * pMode );
  1181.     [helpstring("method SetInsertMode")] 
  1182.     HRESULT SetInsertMode(long Mode);
  1183.     [helpstring("method EnableTransitions")] 
  1184.     HRESULT EnableTransitions(BOOL fEnabled);
  1185.     [helpstring("method TransitionsEnabled")] 
  1186.     HRESULT TransitionsEnabled(BOOL * pfEnabled);
  1187.     [helpstring("method EnableEffects")] 
  1188.     HRESULT EnableEffects(BOOL fEnabled);
  1189.     [helpstring("method EffectsEnabled")] 
  1190.     HRESULT EffectsEnabled(BOOL * pfEnabled);
  1191.     [helpstring("method SetInterestRange")] 
  1192.     HRESULT SetInterestRange(REFERENCE_TIME Start, REFERENCE_TIME Stop);
  1193.     [helpstring("method GetDuration")] 
  1194.     HRESULT GetDuration(REFERENCE_TIME * pDuration);
  1195.     [helpstring("method GetDuration2")] 
  1196.     HRESULT GetDuration2(double * pDuration);
  1197.     [helpstring("method SetDefaultFPS")] 
  1198.     HRESULT SetDefaultFPS(double FPS);
  1199.     [helpstring("method GetDefaultFPS")] 
  1200.     HRESULT GetDefaultFPS(double * pFPS);
  1201.     [helpstring("method IsDirty")] 
  1202.     HRESULT IsDirty(BOOL * pDirty);
  1203.     [helpstring("method GetDirtyRange")] 
  1204.     HRESULT GetDirtyRange(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop);
  1205.     [helpstring("method GetCountOfType")] 
  1206.     HRESULT GetCountOfType(long Group, long * pVal, long * pValWithComps, TIMELINE_MAJOR_TYPE MajorType );
  1207.     HRESULT ValidateSourceNames( long ValidateFlags, IMediaLocator * pOverride, LONG_PTR NotifyEventHandle );
  1208.  
  1209.     HRESULT SetDefaultTransition( GUID * pGuid );
  1210.     HRESULT GetDefaultTransition( GUID * pGuid );
  1211.     HRESULT SetDefaultEffect( GUID * pGuid );
  1212.     HRESULT GetDefaultEffect( GUID * pGuid );
  1213.     HRESULT SetDefaultTransitionB( BSTR pGuid );
  1214.     HRESULT GetDefaultTransitionB( [out,retval] BSTR * pGuid );
  1215.     HRESULT SetDefaultEffectB( BSTR pGuid );
  1216.     HRESULT GetDefaultEffectB( [out,retval] BSTR * pGuid );
  1217. };
  1218.  
  1219. ////////////////////////////////////////////////////////////////
  1220. ////////////////////////////////////////////////////////////////
  1221. // XML STUFF --- XML STUFF --- XML STUFF --- XML STUFF --- XML
  1222. ////////////////////////////////////////////////////////////////
  1223. ////////////////////////////////////////////////////////////////
  1224.  
  1225. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1226. // Xml2Dex - converts back and forth between XML and a dexter project
  1227. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1228.  
  1229. [
  1230.     object,
  1231.     uuid(18C628ED-962A-11D2-8D08-00A0C9441E20),
  1232.     odl,
  1233.     helpstring("IXml2Dex Interface"),
  1234.     pointer_default(unique)
  1235. ]
  1236. interface IXml2Dex : IDispatch
  1237. {
  1238.     [id(1), helpstring("method CreateGraphFromFile")] 
  1239.     HRESULT CreateGraphFromFile([out] IUnknown ** ppGraph, IUnknown * pTimeline, BSTR Filename);
  1240.     [id(2), helpstring("method WriteGrfFile")] 
  1241.     HRESULT WriteGrfFile(IUnknown * pGraph, BSTR FileName);
  1242.     [id(3), helpstring("method WriteXMLFile")] 
  1243.     HRESULT WriteXMLFile(IUnknown * pTimeline, BSTR FileName);
  1244.     [id(5), helpstring("method ReadXMLFile")] 
  1245.     HRESULT ReadXMLFile(IUnknown *pTimeline, BSTR XMLName);
  1246.     [id(6), helpstring("method Delete")] 
  1247.     HRESULT Delete(IUnknown *pTimeline, double dStart, double dEnd);
  1248.     [id(7), helpstring("method WriteXMLPart")] 
  1249.     HRESULT WriteXMLPart(IUnknown * pTimeline, double dStart, double dEnd, BSTR FileName);
  1250.     [id(8), helpstring("method PasteXMLFile")] 
  1251.     HRESULT PasteXMLFile(IUnknown * pTimeline, double dStart, BSTR FileName);
  1252.     [id(9), helpstring("method CopyXML")] 
  1253.     HRESULT CopyXML(IUnknown * pTimeline, double dStart, double dEnd);
  1254.     [id(10), helpstring("method PasteXML")] 
  1255.     HRESULT PasteXML(IUnknown * pTimeline, double dStart);
  1256.     [id(11), helpstring("method Reset")] 
  1257.     HRESULT Reset( );
  1258.     [id(12), helpstring("method ReadXML")] 
  1259.     HRESULT ReadXML(IUnknown *pTimeline, IUnknown *pXML);
  1260.     [id(13), helpstring("method WriteXML")] 
  1261.     HRESULT WriteXML(IUnknown *pTimeline, BSTR *pbstrXML);
  1262. };
  1263.  
  1264. ////////////////////////////////////////////////////////////////
  1265. ////////////////////////////////////////////////////////////////
  1266. // USEFUL HELPER INTERFACES
  1267. ////////////////////////////////////////////////////////////////
  1268. ////////////////////////////////////////////////////////////////
  1269.  
  1270. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1271. // IAMErrorLog - an interface that receives error information from
  1272. // a timeline or a render engine.
  1273. //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1274.  
  1275. [
  1276.     object,
  1277.     uuid(E43E73A2-0EFA-11d3-9601-00A0C9441E20),
  1278.     odl,
  1279.     helpstring("IAMErrorLog Interface"),
  1280.     pointer_default(unique)
  1281. ]
  1282. interface IAMErrorLog : IUnknown
  1283. {
  1284.     [helpstring("method LogError")] HRESULT LogError(long Severity, BSTR pErrorString, long ErrorCode, long hresult, [in] VARIANT * pExtraInfo );
  1285. };
  1286.  
  1287. [
  1288.     object,
  1289.     uuid(963566DA-BE21-4eaf-88E9-35704F8F52A1),
  1290.     odl,
  1291.     helpstring("IAMSetErrorLog Interface"),
  1292.     pointer_default(unique)
  1293. ]
  1294. interface IAMSetErrorLog : IUnknown
  1295. {
  1296.     [propget, helpstring("property ErrorLog")] HRESULT ErrorLog([out, retval] IAMErrorLog * *pVal);
  1297.     [propput, helpstring("property ErrorLog")] HRESULT ErrorLog([in] IAMErrorLog * newVal);
  1298. };
  1299.  
  1300. [
  1301.     object,
  1302.     uuid(0579154A-2B53-4994-B0D0-E773148EFF85),
  1303.     local,
  1304.     helpstring("ISampleGrabberCB Interface"),
  1305.     pointer_default(unique)
  1306. ]
  1307. interface ISampleGrabberCB : IUnknown
  1308. {
  1309.     HRESULT SampleCB( double SampleTime, IMediaSample * pSample );
  1310.     HRESULT BufferCB( double SampleTime, BYTE * pBuffer, long BufferLen );
  1311. }
  1312.  
  1313. [
  1314.     object,
  1315.     uuid(6B652FFF-11FE-4fce-92AD-0266B5D7C78F),
  1316.     local,
  1317.     helpstring("ISampleGrabber Interface"),
  1318.     pointer_default(unique)
  1319. ]
  1320. interface ISampleGrabber: IUnknown
  1321. {
  1322.     // set this to have the filter immediate stop after
  1323.     // garnishing a sample
  1324.     //
  1325.     HRESULT SetOneShot( BOOL OneShot );
  1326.  
  1327.     // set what media type we connect to. It can be partially
  1328.     // specified by setting only the major type, OR the major and
  1329.     // subtype, OR major, subtype, and the formattype.
  1330.     //
  1331.     HRESULT SetMediaType( const AM_MEDIA_TYPE * pType );
  1332.  
  1333.     // after something's connected to this filter, find out
  1334.     // what it is
  1335.     //
  1336.     HRESULT GetConnectedMediaType( AM_MEDIA_TYPE * pType );
  1337.  
  1338.     // call this to buffer incoming samples, so the next two methods will work
  1339.     // If this is not called, the next two methods will return
  1340.     // E_INVALIDARG
  1341.     //
  1342.     HRESULT SetBufferSamples( BOOL BufferThem );
  1343.  
  1344.     // pass in NULL for pBuffer to get out the buffer size you need to
  1345.     // allocate. This will NOT return a pointer to a compressed dib
  1346.     // any longer! It will return the IMediaSample's GetPointer buffer. 
  1347.     //
  1348.     HRESULT GetCurrentBuffer( [in,out] long * pBufferSize, [out] long * pBuffer );
  1349.  
  1350.     // return the currently buffered sample
  1351.     //
  1352.     HRESULT GetCurrentSample( [out,retval] IMediaSample ** ppSample );
  1353.  
  1354.     // if this callback is set, then it will be called for
  1355.     // every sample passing through the filter. Do not take a long time
  1356.     // in the callback for smooth playback (obviously!)
  1357.     //
  1358.     HRESULT SetCallback( ISampleGrabberCB * pCallback, long WhichMethodToCallback );
  1359. };
  1360.  
  1361. ////////////////////////////////////////////////////////////////
  1362. ////////////////////////////////////////////////////////////////
  1363. // THE LIBRARY ITSELF
  1364. ////////////////////////////////////////////////////////////////
  1365. ////////////////////////////////////////////////////////////////
  1366.  
  1367. [
  1368.     uuid(78530B68-61F9-11D2-8CAD-00A024580902),
  1369.     version(1.0),
  1370.     helpstring("Dexter 1.0 Type Library")
  1371. ]
  1372. library DexterLib
  1373. {
  1374.     importlib("stdole2.tlb");
  1375.  
  1376.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1377.     // resize the input video to an output size, for uniformity within DES. 
  1378.     // DES will set the output media type and probably also put_Size. By setting
  1379.     // the output media type, DES is stating the resizer must produce only that
  1380.     // media type on the output pin, unless it is succeeded by a put_Size call.
  1381.     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1382.  
  1383.     [
  1384.         object,
  1385.         uuid(4ada63a0-72d5-11d2-952a-0060081840bc),
  1386.         odl,
  1387.         helpstring("IResize Interface"),
  1388.         pointer_default(unique)
  1389.     ]
  1390.     interface IResize : IUnknown
  1391.     {
  1392.         HRESULT get_Size([out] int *piHeight, [out] int *piWidth, [out] long *pFlag);
  1393.         HRESULT get_InputSize([out] int *piHeight, [out] int *piWidth);
  1394.         HRESULT put_Size([in] int Height, [in] int Width, [in] long Flag);
  1395.         HRESULT get_MediaType([out] AM_MEDIA_TYPE *pmt);
  1396.         HRESULT put_MediaType([in] const AM_MEDIA_TYPE *pmt);
  1397.     };
  1398.  
  1399.     [
  1400.         uuid(78530B75-61F9-11D2-8CAD-00A024580902),
  1401.         helpstring("AMTimeline Class")
  1402.     ]
  1403.     coclass AMTimeline
  1404.     {
  1405.         [default] interface IAMTimeline;
  1406.         interface IPersistStream;
  1407.         interface IAMSetErrorLog;
  1408.     };
  1409.  
  1410.     [
  1411.         uuid(78530B78-61F9-11D2-8CAD-00A024580902),
  1412.         helpstring("IAMTimelineObj Class")
  1413.     ]
  1414.     coclass AMTimelineObj
  1415.     {
  1416.         [default] interface IAMTimelineObj;
  1417.     };
  1418.  
  1419.     [
  1420.         uuid(78530B7A-61F9-11D2-8CAD-00A024580902),
  1421.         helpstring("IAMTimelineSrc Class")
  1422.     ]
  1423.     coclass AMTimelineSrc
  1424.     {
  1425.         [default] interface IAMTimelineSrc;
  1426.         interface IAMTimelineObj;
  1427.         interface IAMTimelineEffectable;
  1428.         interface IAMTimelineSplittable;
  1429.     };
  1430.  
  1431.     [
  1432.         uuid(8F6C3C50-897B-11d2-8CFB-00A0C9441E20),
  1433.     ]
  1434.     coclass AMTimelineTrack
  1435.     {
  1436.         [default] interface IAMTimelineTrack;
  1437.         interface IAMTimelineObj;
  1438.         interface IAMTimelineEffectable;
  1439.         interface IAMTimelineTransable;
  1440.         interface IAMTimelineVirtualTrack;
  1441.         interface IAMTimelineSplittable;
  1442.     };
  1443.  
  1444.     [
  1445.         uuid(74D2EC80-6233-11d2-8CAD-00A024580902),
  1446.     ]
  1447.     coclass AMTimelineComp
  1448.     {
  1449.         [default] interface IAMTimelineComp;
  1450.         interface IAMTimelineObj;
  1451.         interface IAMTimelineEffectable;
  1452.         interface IAMTimelineTransable;
  1453.         interface IAMTimelineVirtualTrack;
  1454.     };
  1455.  
  1456.     [
  1457.         uuid(F6D371E1-B8A6-11d2-8023-00C0DF10D434),
  1458.     ]
  1459.     coclass AMTimelineGroup
  1460.     {
  1461.         [default] interface IAMTimelineGroup;
  1462.         interface IAMTimelineComp;
  1463.         interface IAMTimelineObj;
  1464.     };
  1465.  
  1466.     [
  1467.         uuid(74D2EC81-6233-11d2-8CAD-00A024580902),
  1468.     ]
  1469.     coclass AMTimelineTrans
  1470.     {
  1471.         [default] interface IAMTimelineTrans;
  1472.         interface IAMTimelineObj;
  1473.         interface IAMTimelineSplittable;
  1474.     };
  1475.  
  1476.     [
  1477.         uuid(74D2EC82-6233-11d2-8CAD-00A024580902),
  1478.     ]
  1479.         coclass AMTimelineEffect
  1480.     {
  1481.         [default] interface IAMTimelineEffect;
  1482.         interface IAMTimelineObj;
  1483.         interface IAMTimelineSplittable;
  1484.         interface IPropertyBag;
  1485.     };
  1486.  
  1487.     [
  1488.         uuid(64D8A8E0-80A2-11d2-8CF3-00A0C9441E20),
  1489.     ]
  1490.     coclass RenderEngine
  1491.     {
  1492.         [default] interface IRenderEngine;
  1493.         interface IRenderEngine2;
  1494.         interface IAMSetErrorLog;
  1495.     };
  1496.  
  1497.     [
  1498.         uuid(498B0949-BBE9-4072-98BE-6CCAEB79DC6F),
  1499.     ]
  1500.     coclass SmartRenderEngine
  1501.     {
  1502.         [default] interface IRenderEngine;
  1503.         interface ISmartRenderEngine;
  1504.         interface IAMSetErrorLog;
  1505.     };
  1506.  
  1507.     [
  1508.     uuid(036A9790-C153-11d2-9EF7-006008039E37),
  1509.     ]
  1510.         coclass AudMixer
  1511.     {
  1512.         [default] interface IBaseFilter;
  1513.     };
  1514.  
  1515.     [
  1516.         uuid(18C628EE-962A-11D2-8D08-00A0C9441E20),
  1517.         helpstring("Xml2Dex Class")
  1518.     ]
  1519.     coclass Xml2Dex
  1520.     {
  1521.         [default] interface IXml2Dex;
  1522.     };
  1523.  
  1524.     [
  1525.         uuid(CC1101F2-79DC-11D2-8CE6-00A0C9441E20),
  1526.         helpstring("MediaLocator Class")
  1527.     ]
  1528.     coclass MediaLocator
  1529.     {
  1530.         [default] interface IMediaLocator;
  1531.     };
  1532.  
  1533.     [
  1534.         uuid(ADF95821-DED7-11d2-ACBE-0080C75E246E),
  1535.         helpstring("Varying Property Holder")
  1536.     ]
  1537.     coclass PropertySetter
  1538.     {
  1539.         [default] interface IPropertySetter;
  1540.         interface IAMSetErrorLog;
  1541.     };
  1542.  
  1543.     [
  1544.         uuid(65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA),
  1545.         helpstring("MediaDet Class")
  1546.     ]
  1547.     coclass MediaDet
  1548.     {
  1549.         [default] interface IMediaDet;
  1550.     };
  1551.  
  1552.     [
  1553.         uuid(C1F400A0-3F08-11d3-9F0B-006008039E37),
  1554.         helpstring("MsGrab Class")
  1555.     ]
  1556.     coclass SampleGrabber
  1557.     {
  1558.         [default] interface ISampleGrabber;
  1559.     };
  1560.  
  1561.     // useful for movie maker and other people
  1562.     [
  1563.         uuid(C1F400A4-3F08-11d3-9F0B-006008039E37),
  1564.         helpstring("NullRenderer Class")
  1565.     ]
  1566.     coclass NullRenderer
  1567.     {
  1568.         [default] interface IBaseFilter;
  1569.     };
  1570.  
  1571.     [
  1572.          uuid(BB44391D-6ABD-422f-9E2E-385C9DFF51FC),
  1573.          helpstring("DxtCompositor Class")
  1574.     ]
  1575.     coclass DxtCompositor
  1576.     {
  1577.          [default] interface IDxtCompositor;
  1578.     };
  1579.  
  1580.     [
  1581.          uuid(506D89AE-909A-44f7-9444-ABD575896E35),
  1582.          helpstring("DxtAlphaSetter Class")
  1583.     ]
  1584.     coclass DxtAlphaSetter
  1585.     {
  1586.          [default] interface IDxtAlphaSetter;
  1587.     };
  1588.  
  1589.     [
  1590.         uuid(DE75D012-7A65-11D2-8CEA-00A0C9441E20),
  1591.         helpstring("SMPTE wipe DXT")
  1592.     ]
  1593.     coclass DxtJpeg
  1594.     {
  1595.         [default] interface IDxtJpeg;
  1596.     };
  1597.  
  1598.     [
  1599.         uuid(0cfdd070-581a-11d2-9ee6-006008039e37),
  1600.     ]
  1601.     coclass ColorSource
  1602.     {
  1603.         [default] interface IBaseFilter;
  1604.     };
  1605.  
  1606.     [
  1607.         uuid(C5B19592-145E-11d3-9F04-006008039E37),
  1608.         helpstring("DxtKey Class")
  1609.     ]
  1610.     coclass DxtKey
  1611.     {
  1612.         [default] interface IDxtKey;
  1613.     };
  1614. };
  1615.  
  1616. // these are some error codes that we can/will return
  1617. enum
  1618. {
  1619.     E_NOTINTREE = 0x80040400,
  1620.     E_RENDER_ENGINE_IS_BROKEN = 0x80040401,
  1621.     E_MUST_INIT_RENDERER = 0x80040402,
  1622.     E_NOTDETERMINED = 0x80040403,
  1623.     E_NO_TIMELINE = 0x80040404,
  1624.     S_WARN_OUTPUTRESET = 40404
  1625. };
  1626.  
  1627. // These codes are given to the app in IAMErrorLog to help identify what went wrong
  1628.  
  1629. // Filename doesn't exist, or DShow doesn't recognize the filetype
  1630. // EXTRA - filename
  1631. cpp_quote("#define DEX_IDS_BAD_SOURCE_NAME    1400")
  1632.  
  1633. // Filename doesn't exist or contains unknown data
  1634. // EXTRA - filename (maybe no codec?)
  1635. cpp_quote("#define DEX_IDS_BAD_SOURCE_NAME2    1401")
  1636.  
  1637. // filename was required, but wasn't given
  1638. cpp_quote("#define DEX_IDS_MISSING_SOURCE_NAME    1402")
  1639.  
  1640. // cannot parse data provided by this source
  1641. // !!! what source?
  1642. cpp_quote("#define DEX_IDS_UNKNOWN_SOURCE    1403")
  1643.  
  1644. // unexpected error - some DShow component not installed correctly
  1645. cpp_quote("#define DEX_IDS_INSTALL_PROBLEM    1404")
  1646.  
  1647. // Source filter does not accept filenames
  1648. // !!! What source?
  1649. cpp_quote("#define DEX_IDS_NO_SOURCE_NAMES    1405")
  1650.  
  1651. // The group's mediatype is not supported
  1652. // EXTRA - gives you an integer group number
  1653. cpp_quote("#define DEX_IDS_BAD_MEDIATYPE    1406")
  1654.  
  1655. // Invalid stream number for a source
  1656. // EXTRA - gives the stream number !!! should identify which source!
  1657. cpp_quote("#define DEX_IDS_STREAM_NUMBER    1407")
  1658.  
  1659. // You ran out of memory
  1660. cpp_quote("#define DEX_IDS_OUTOFMEMORY        1408")
  1661.  
  1662. // One bitmap in a sequence was not the same type as the others
  1663. // EXTRA - gives the bitmap name
  1664. cpp_quote("#define DEX_IDS_DIBSEQ_NOTALLSAME    1409")
  1665.  
  1666. // Clip's mediatimes are invalid, or DibSeq too short, or a previous error caused this
  1667. // !!! Needs to give the clip name
  1668. cpp_quote("#define DEX_IDS_CLIPTOOSHORT        1410")
  1669.  
  1670. // Clsid of FX/Transition is not a DirectX Transform
  1671. // EXTRA - gives the CLSID
  1672. cpp_quote("#define DEX_IDS_INVALID_DXT        1411")
  1673.  
  1674. // Default FX/Transition Clsid is not a DirectX Transform"
  1675. // EXTRA - gives the CLSID
  1676. cpp_quote("#define DEX_IDS_INVALID_DEFAULT_DXT    1412")
  1677.  
  1678. // Your version of DX doesn't support 3D transforms"
  1679. // EXTRA - gives the CLSID of the 3D transform you tried to use
  1680. cpp_quote("#define DEX_IDS_NO_3D        1413")
  1681.  
  1682. // This DirectX Transform is not the right kind, or is broken
  1683. // EXTRA - gives the CLSID of the broken transform
  1684. cpp_quote("#define DEX_IDS_BROKEN_DXT        1414")
  1685.  
  1686. // No such property exists on an object
  1687. // EXTRA - gives the name of the property (if given as a string)
  1688. cpp_quote("#define DEX_IDS_NO_SUCH_PROPERTY    1415")
  1689.  
  1690. // Illegal value for a property
  1691. // EXTRA - gives the VARIANT value that was illegal
  1692. cpp_quote("#define DEX_IDS_ILLEGAL_PROPERTY_VAL    1416")
  1693.  
  1694. // Syntax error in XML file at line:
  1695. // EXTRA - gives I4 line number, if available
  1696. cpp_quote("#define DEX_IDS_INVALID_XML        1417")
  1697.  
  1698. // Can't find filter specified in XML by Category and Instance
  1699. // EXTRA - gives friendly name (instance)
  1700. cpp_quote("#define DEX_IDS_CANT_FIND_FILTER    1418")
  1701.  
  1702. // Disk error writing XML file
  1703. cpp_quote("#define DEX_IDS_DISK_WRITE_ERROR    1419")
  1704.  
  1705. // Clsid not a valid DShow audio effect filter
  1706. // EXTRA - gives the CLSID
  1707. cpp_quote("#define DEX_IDS_INVALID_AUDIO_FX    1420")
  1708.  
  1709. // Cannot find compressor for smart recompression type
  1710. cpp_quote("#define DEX_IDS_CANT_FIND_COMPRESSOR 1421")
  1711.  
  1712.  
  1713.  
  1714. // !!! Here go problems hooking up sources or finding codecs
  1715.  
  1716.  
  1717. // THE FOLLOWING SHOULD NEVER HAPPEN - please call me if they do
  1718.  
  1719. // Unexpected error in parsing the timeline
  1720. cpp_quote("#define DEX_IDS_TIMELINE_PARSE    1426")
  1721. // Unexpected error building the filtergraph
  1722. cpp_quote("#define DEX_IDS_GRAPH_ERROR        1427")
  1723. // Unexpected error with the internal grid
  1724. cpp_quote("#define DEX_IDS_GRID_ERROR        1428")
  1725. // Unexpected error getting an interface
  1726. cpp_quote("#define DEX_IDS_INTERFACE_ERROR    1429")
  1727.  
  1728. // these are the enumeration categories for effects
  1729. //
  1730. cpp_quote("EXTERN_GUID(CLSID_VideoEffects1Category, 0xcc7bfb42, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);")
  1731. cpp_quote("EXTERN_GUID(CLSID_VideoEffects2Category, 0xcc7bfb43, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);")
  1732. cpp_quote("EXTERN_GUID(CLSID_AudioEffects1Category, 0xcc7bfb44, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);")
  1733. cpp_quote("EXTERN_GUID(CLSID_AudioEffects2Category, 0xcc7bfb45, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);")
  1734.  
  1735.